home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 8
/
Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso
/
Aminet
/
util
/
cdity
/
Yak210src.lha
/
Yak_2.10_Src
/
GetPubScreen.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-07-16
|
1KB
|
51 lines
#include <exec/types.h>
#include <intuition/screens.h>
#include <proto/intuition.h>
#include "GetPubScreen.h"
UBYTE
*GetPubScreenName( struct Screen *s)
{
struct List *list; /*NMC*/
struct PubScreenNode *psnode;
UBYTE *PSName;
PSName = NULL;
if (s->Flags & WBENCHSCREEN)
{
PSName = "Workbench";
}
else
{
if (s->Flags & PUBLICSCREEN)
{
/* s is a public screen so find its name */
if (list = LockPubScreenList()) /*NMC*/
{
psnode = (struct PubScreenNode *) list->lh_Head; /*NMC*/
while ((psnode->psn_Node.ln_Succ) && !(PSName)) /*NMC*/
{
if (!(psnode->psn_Flags & PSNF_PRIVATE) && (psnode->psn_Screen == s)) /*NMC*/
{
/* found it */
PSName = psnode->psn_Node.ln_Name;
}
else
{
/* check next one */
psnode = (struct PubScreenNode *)psnode->psn_Node.ln_Succ;
}
}
}
UnlockPubScreenList();
}
}
return(PSName);
}